#ifndef XMPP_H
#define XMPP_H

#include <string>
#include <vector>

namespace gloox
{
    class JID;
    class MessageSession;
}

class ContactItem;

class XmppEventHandler
{
public:
    virtual void onConnect() = 0;
    virtual void onDisconnect(int const error) = 0;
    virtual void onContactItem(ContactItem& item) = 0;
    virtual void onContactItems(std::vector<ContactItem>& items) = 0;
    virtual void onMessageSession(gloox::MessageSession *session) = 0;
};

class Xmpp
{
public:
    static Xmpp& instance();
    virtual void setDelegate(XmppEventHandler * pDelegate) = 0;
    virtual bool setLoginInfo(std::string loginId, std::string password) = 0;
    virtual void connect() = 0;
    virtual void disconnect() = 0;
    virtual bool isConnected() = 0;
    virtual void requestVcard(std::string jid) = 0;
    virtual gloox::MessageSession* startChat(std::string& jid) = 0;
    virtual void closeSession(gloox::MessageSession* pSession) = 0;
};


#endif // XMPP_H
